/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package nodeDependencies.impl;

import java.util.Collection;

import nodeDependencies.NodeDependencies;
import nodeDependencies.NodeDependenciesPackage;
import nodeDependencies.Root;

import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Root</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link nodeDependencies.impl.RootImpl#getGetNodeDependencies <em>Get Node Dependencies</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class RootImpl extends EObjectImpl implements Root {
	/**
	 * The cached value of the '{@link #getGetNodeDependencies() <em>Get Node Dependencies</em>}' containment reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getGetNodeDependencies()
	 * @generated
	 * @ordered
	 */
	protected EList<NodeDependencies> getNodeDependencies;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected RootImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return NodeDependenciesPackage.Literals.ROOT;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EList<NodeDependencies> getGetNodeDependencies() {
		if (getNodeDependencies == null) {
			getNodeDependencies = new EObjectContainmentEList<NodeDependencies>(NodeDependencies.class, this, NodeDependenciesPackage.ROOT__GET_NODE_DEPENDENCIES);
		}
		return getNodeDependencies;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case NodeDependenciesPackage.ROOT__GET_NODE_DEPENDENCIES:
				return ((InternalEList<?>)getGetNodeDependencies()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case NodeDependenciesPackage.ROOT__GET_NODE_DEPENDENCIES:
				return getGetNodeDependencies();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case NodeDependenciesPackage.ROOT__GET_NODE_DEPENDENCIES:
				getGetNodeDependencies().clear();
				getGetNodeDependencies().addAll((Collection<? extends NodeDependencies>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case NodeDependenciesPackage.ROOT__GET_NODE_DEPENDENCIES:
				getGetNodeDependencies().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case NodeDependenciesPackage.ROOT__GET_NODE_DEPENDENCIES:
				return getNodeDependencies != null && !getNodeDependencies.isEmpty();
		}
		return super.eIsSet(featureID);
	}

} //RootImpl
